package com.yymmarket.forum.admin;

import java.util.Date;

import com.yymmarket.forum.cache.ForumCache;
import com.yymmarket.forum.user.UserBean;
import com.yymmarket.forum.util.LevelUtil;

public class AdminBean {

	
	private int id;
	private int userId;
	private int foreignerId;
	private int adminLevel;
	private int type;
	private Date createTime;
	private long endTime;
	private int actionUserId;
	private int deleteMark;
	private int deleteUserId;
	private Date deleteTime;
	private String description;
	
	
	

	public AdminBean() {
	}

	public AdminBean(int foreignerId, int adminLevel, int type) {
		this.foreignerId = foreignerId;
		this.adminLevel = adminLevel;
		this.type = type;
	}

	public String getUserName(){
		UserBean bean = ForumCache.getUser(userId);
		return bean==null?"":bean.getUserName();
	}
	
	public String getActionUserName(){
		UserBean bean = ForumCache.getUser(actionUserId);
		return bean==null?"":bean.getUserName();
	}
	
	public String getDeleteUserName(){
		UserBean bean = ForumCache.getUser(deleteUserId);
		return bean==null?"":bean.getUserName();
	}
	
	public String getAdminLevelString(){
		return LevelUtil.getBBSLevel(adminLevel);
	}
	
	public Date getDeleteTime() {
		return deleteTime;
	}
	public void setDeleteTime(Date deleteTime) {
		this.deleteTime = deleteTime;
	}
	public int getDeleteMark() {
		return deleteMark;
	}
	public void setDeleteMark(int deleteMark) {
		this.deleteMark = deleteMark;
	}
	public int getDeleteUserId() {
		return deleteUserId;
	}
	public void setDeleteUserId(int deleteUserId) {
		this.deleteUserId = deleteUserId;
	}
	public int getActionUserId() {
		return actionUserId;
	}
	public void setActionUserId(int actionUserId) {
		this.actionUserId = actionUserId;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public int getForeignerId() {
		return foreignerId;
	}
	public void setForeignerId(int foreignerId) {
		this.foreignerId = foreignerId;
	}
	public int getAdminLevel() {
		return adminLevel;
	}
	public void setAdminLevel(int adminLevel) {
		this.adminLevel = adminLevel;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public long getEndTime() {
		return endTime;
	}
	public void setEndTime(long endTime) {
		this.endTime = endTime;
	}
	
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
}
